<?php

namespace app\api\model;

use think\Model;

class UserGrade extends Model
{
    protected $autoWriteTimestamp = false;

    public static function add($user_id, $before_vip, $current_vip, $type)
    {
        return self::create( [
            'user_id' =>$user_id,
            'before_grade' => $before_vip,
            'current_grade' => $current_vip,
            'type' => $type,
            'createtime' => time()
        ]);
    }
}
